package com.hq.shop06back.feign.api;

import com.hq.shop06back.feign.impl.UserServiceImpl;
import com.hq.shop06back.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(
        name = "user",
        path = "/user",
        fallback = UserServiceImpl.class)
public interface UserService {

    @PostMapping("addUser")
    public boolean addUser(@RequestBody User user);

    @GetMapping("getList")
    public List<User> getList();

    @PostMapping("queryList")
    public List<User> queryList(User user);
}
